package cn.good.controller;

import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.good.pojo.Goods;
import cn.good.service.goods.GoodsService;





@Controller
@RequestMapping("/good")
public class GoodsController {
	private Logger logger = Logger.getLogger(GoodsController.class);
	
	@Resource
	private GoodsService goods;
	
	@RequestMapping(value="/goodList")
	public String goodsList(Model model,String billStatus) throws Exception{
		logger.debug("view stuList====================== ");
		List<Goods> goodsList = goods.getList(Integer.parseInt(billStatus));
		model.addAttribute("GoodstList",goodsList);
		return "index";
	}
}
